package com.hc.demo.controller;

import com.hc.demo.dto.ResultResponse;
import com.hc.demo.service.ReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ReportController {

    @Autowired
    ReportService reportService;



    @RequestMapping("/report/{orderId}")  //reportAndReportdetailed
    public ResultResponse getReportAndReportdetailedByOrderId(@PathVariable("orderId") Integer orderId){


        System.out.println("orderId:"+orderId);
       return reportService.getReportAndReportdetailedByOrderId(orderId);
    }

}
